const express = require('express');
const router = express.Router();
const mediaController = require('../controllers/media');
const { imageGenerateValidator, videoGenerateValidator } = require('../middleware/validator');

/**
 * @route POST /api/media/image
 * @desc 生成教学图像
 * @access Public
 */
router.post('/image', imageGenerateValidator, mediaController.generateImage);

/**
 * @route POST /api/media/video
 * @desc 生成教学视频
 * @access Public
 */
router.post('/video', videoGenerateValidator, mediaController.generateVideo);

/**
 * @route GET /api/media/:resourceId
 * @desc 获取媒体资源详情
 * @access Public
 */
router.get('/:resourceId', mediaController.getMediaDetail);

module.exports = router;